package com.zzx.controller.converter;

import org.springframework.core.convert.converter.Converter;

public class StringTrimConverter implements Converter<String, String> {

	@Override
	public String convert(String source) {
		try {
			if (source!=null) {
				if ("".equals(source)) {
					return null;
				}
				return source.trim();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

}
